package org.cs.publics.model;
// Generated 2018-12-28 17:39:08 by Hibernate Tools 5.2.3.Final

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 拼团商品信息表
 */

/**
 * GroupInfo generated by hbm2java
 */
@Entity
@Table(name = "group_info", catalog = "good_fresh")
public class GroupInfo implements java.io.Serializable {

	private Integer groupInfoId;
	private GoodsInfo goodsInfo;
	private Date groupInfoStartTime;
	private Date groupInfoEndTime;
	private Date createTime;
	private Date updateTime;
	private int groupInfoPeopleno;
	private String groupInfoDesc;
	private String goodsHoldOne;
	private String goodsHoldTwo;
	private Set<GroupUser> groupUsersForGroupInfoId = new HashSet<GroupUser>(0);
	private Set<GroupExplain> groupExplains = new HashSet<GroupExplain>(0);
	private Set<GroupUser> groupUsersForGroupInfoId_1 = new HashSet<GroupUser>(0);

	public GroupInfo() {
	}

	public GroupInfo(GoodsInfo goodsInfo, Date groupInfoStartTime, Date groupInfoEndTime, Date createTime,
			Date updateTime, int groupInfoPeopleno, String groupInfoDesc, String goodsHoldOne, String goodsHoldTwo) {
		this.goodsInfo = goodsInfo;
		this.groupInfoStartTime = groupInfoStartTime;
		this.groupInfoEndTime = groupInfoEndTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.groupInfoPeopleno = groupInfoPeopleno;
		this.groupInfoDesc = groupInfoDesc;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
	}

	public GroupInfo(GoodsInfo goodsInfo, Date groupInfoStartTime, Date groupInfoEndTime, Date createTime,
			Date updateTime, int groupInfoPeopleno, String groupInfoDesc, String goodsHoldOne, String goodsHoldTwo,
			Set<GroupUser> groupUsersForGroupInfoId, Set<GroupExplain> groupExplains,
			Set<GroupUser> groupUsersForGroupInfoId_1) {
		this.goodsInfo = goodsInfo;
		this.groupInfoStartTime = groupInfoStartTime;
		this.groupInfoEndTime = groupInfoEndTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.groupInfoPeopleno = groupInfoPeopleno;
		this.groupInfoDesc = groupInfoDesc;
		this.goodsHoldOne = goodsHoldOne;
		this.goodsHoldTwo = goodsHoldTwo;
		this.groupUsersForGroupInfoId = groupUsersForGroupInfoId;
		this.groupExplains = groupExplains;
		this.groupUsersForGroupInfoId_1 = groupUsersForGroupInfoId_1;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "GROUP_INFO_ID", unique = true, nullable = false)
	public Integer getGroupInfoId() {
		return this.groupInfoId;
	}

	public void setGroupInfoId(Integer groupInfoId) {
		this.groupInfoId = groupInfoId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_INFO_ID", nullable = false)
	public GoodsInfo getGoodsInfo() {
		return this.goodsInfo;
	}

	public void setGoodsInfo(GoodsInfo goodsInfo) {
		this.goodsInfo = goodsInfo;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GROUP_INFO_START_TIME", nullable = false, length = 19)
	public Date getGroupInfoStartTime() {
		return this.groupInfoStartTime;
	}

	public void setGroupInfoStartTime(Date groupInfoStartTime) {
		this.groupInfoStartTime = groupInfoStartTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "GROUP_INFO_END_TIME", nullable = false, length = 19)
	public Date getGroupInfoEndTime() {
		return this.groupInfoEndTime;
	}

	public void setGroupInfoEndTime(Date groupInfoEndTime) {
		this.groupInfoEndTime = groupInfoEndTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "UPDATE_TIME", nullable = false, length = 19)
	public Date getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "GROUP_INFO_PEOPLENO", nullable = false)
	public int getGroupInfoPeopleno() {
		return this.groupInfoPeopleno;
	}

	public void setGroupInfoPeopleno(int groupInfoPeopleno) {
		this.groupInfoPeopleno = groupInfoPeopleno;
	}

	@Column(name = "GROUP_INFO_DESC", nullable = false, length = 300)
	public String getGroupInfoDesc() {
		return this.groupInfoDesc;
	}

	public void setGroupInfoDesc(String groupInfoDesc) {
		this.groupInfoDesc = groupInfoDesc;
	}

	@Column(name = "GOODS_HOLD_ONE", nullable = false, length = 25)
	public String getGoodsHoldOne() {
		return this.goodsHoldOne;
	}

	public void setGoodsHoldOne(String goodsHoldOne) {
		this.goodsHoldOne = goodsHoldOne;
	}

	@Column(name = "GOODS_HOLD_TWO", nullable = false, length = 25)
	public String getGoodsHoldTwo() {
		return this.goodsHoldTwo;
	}

	public void setGoodsHoldTwo(String goodsHoldTwo) {
		this.goodsHoldTwo = goodsHoldTwo;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "groupInfoByGroupInfoId")
	public Set<GroupUser> getGroupUsersForGroupInfoId() {
		return this.groupUsersForGroupInfoId;
	}

	public void setGroupUsersForGroupInfoId(Set<GroupUser> groupUsersForGroupInfoId) {
		this.groupUsersForGroupInfoId = groupUsersForGroupInfoId;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "groupInfo")
	public Set<GroupExplain> getGroupExplains() {
		return this.groupExplains;
	}

	public void setGroupExplains(Set<GroupExplain> groupExplains) {
		this.groupExplains = groupExplains;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "groupInfoByGroupInfoId")
	public Set<GroupUser> getGroupUsersForGroupInfoId_1() {
		return this.groupUsersForGroupInfoId_1;
	}

	public void setGroupUsersForGroupInfoId_1(Set<GroupUser> groupUsersForGroupInfoId_1) {
		this.groupUsersForGroupInfoId_1 = groupUsersForGroupInfoId_1;
	}

}
